<template>
  <div class="list">
    <ul>
      <li v-for="item in arr" :key="item.id">
        <el-checkbox v-model="item.check"></el-checkbox>
        <span>{{ item.cont }}</span>
        <el-button type="text" @click="del1(item.id)">删除</el-button>
      </li>
    </ul>
  </div>
</template>

<script>
// @ is an alias to /src
import { mapState, mapMutations } from "vuex";

export default {
  name: "HomeView",
  data() {
    return {};
  },
  components: {},
  computed: {
    ...mapState("seek", ["arr"]),
  },
  methods: {
    ...mapMutations("seek", ["del"]),
    del1(i) {
      this.del(i);
    },
  },
};
</script>
<style lang="less" scoped>
ul {
  padding: 0;
}
li {
  list-style: none;
  border-bottom: 1px solid #dcdfe6;
  padding: 10px;
  text-align: left;
  .el-checkbox {
    margin-right: 10px;
    margin-left: 10px;
  }
  .el-button {
    float: right;
    padding: 0;
  }
}
</style>
